<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="../Public/Css/userp.css" />
<script type="text/javascript" src="../Public/Js/choose.js"></script>
<script type="text/javascript" src="../Public/Js/jquery.js"></script>
</head>
<body>
<div class="content">

	<div class="pos">
		<div class="posDe">当前位置 : <font style="color:blue;">产品管理&gt;管理产品</font></div>
	</div>
	
	<div id="prom">
	<div style='margin-top:5px;'>
		<form action="ProM.php" method='get'>
				<input type='hidden' name='flag' value='display'/>
				食品名称：<input type='text' size='10' name='food_name'/>
				提&nbsp;供&nbsp;商：<select name='food_from'>
									<{foreach from=$cpData item=cv}>
										<option value='<{$cv.cp_id}>'><{$cv.cp_name}></option>
									<{/foreach}>
								</select>
				食品类型：<select name='food_type'>
						<option value=''>--请选择--</option>
						<option value='1'>节令食品</option>
						<option value='2'>四季食品</option>
						<option value='3'>儿童食品</option>
					  </select>
				价格范围：<input type='text' name='pricemin' size='2'/>~<input type='text' size='2' name='pricemax'/>元
				是否过期：<input type='radio' name='dated' value='1'/>已过期
					  <input type='radio' name='dated' value='0'/>未过期
				<input type='submit' value='搜索'/>
		</form>
	</div>
	<form action="ProM.php?flag=delMore" method='post'>
		<table>
			<tr>
				<th><input type='checkbox' name='All' onclick='checkboxChooseAll();'/></th>
				<th>食品编号</th>
				<th>食品名称</th>
				<th>提供商</th>
				<th>食品类型</th>
				<th>食品价格</th>
				<th>会员价格</th>
				<th>点击率</th>
				<th>是否推荐</th>
				<th>添加时间</th>
				<th>生产日期</th>
				<th>过期时间</th>
				<th>操作</th>
			</tr>
			<{foreach from=$proData item=v}>
			<tr>
<!-- 			<td><img src='../Public/Images/off.gif'></td> -->
			<td><input type='checkbox' name='each[]' value='<{$v.food_id}>'/></td>
			<td><{$v.food_id}></td>
			<td><{$v.food_name}></td>
			<td>
			<{*这个需要从数据库中去取*}>
				<{foreach from=$cpData item=cpv}>
					<{if $cpv.cp_id eq $v.food_from}>
					<{$cpv.cp_name}>
					<{/if}>
				<{/foreach}>
			</td>
			<td>
				<{if $v.food_type eq 1}>
					节令食品
				<{elseif $v.food_type eq 2}>
					四季食品
				<{else}>
					儿童食品
				<{/if}>
			</td>
			<td><{$v.food_singleprice}>元</td>
			<td><{$v.food_userprice}>元</td>
			<td><{$v.food_count}></td>
			<td>
				<{if $v.food_state eq 0}>
					<font style='color:green;'>正常</font>
				<{else}>
					<font style='color:#E75607;'>推荐</font>
				<{/if}>
			</td>
			<td><{"Y-m-d"|date:$v.food_addtime}></td>
			<td><{"Y-m-d"|date:$v.food_producttime}></td>
			<td>
				<{if $v.endflag eq 1}>
					<font style='color:red;'><{"Y-m-d"|date:$v.food_enddate}></font>
				<{else}>
					<font style='color:green;'><{"Y-m-d"|date:$v.food_enddate}></font>
				<{/if}>
			</td>
			<td><a href="ProM.php?flag=prodelete&food_id=<{$v.food_id}>">[删除]</a><a href="ProUpdate.php?flag=display&food_id=<{$v.food_id}>">[修改]</a></td>
			</tr>
			<{foreachelse}>
			<tr><td colspan="12"><center>暂时没有产品信息</center></td></tr>
			<{/foreach}>
		</table>
		<div style='border:0px solid red;width:400px;margin-left:10px;'><input type="button" value="全选" onclick="buttonChooseAll();"><input type="button" value="反选" onclick="buttonReChoose();">&nbsp;&nbsp;<input type="submit" value="删除选中"></div>
		</form>
		<div>
			<{$pageStr}>
		</div>
	</div>

</div>
</body>

